#region Summary

// 
// Owner : JackieHan 
// 
// Solution : Skomart.Spider 
// 
// Project : Jackie.Utility.Test
// 
// File : TestSimpleConversionWithA.cs
// 
// CopyRight : Copyright © 2010-2011 Skomart Corporation, All Rights Reserved 
// 
// Summary : 测试类型转换 用测试类BA，VA
// 
// History : 
//			2010-10-12 11:34:27	    Create 
// 

#endregion

#region Using

using System;
using System.Collections.Generic;
using Jackie.Utility.BvConversion;
using Jackie.Utility.Test.TestConversion.TestClass;
using NUnit.Framework;

#endregion

namespace Jackie.Utility.Test.TestConversion
{
    /// <summary> 
    /// 测试类型转换 用测试类BA，VA
    /// </summary>
    [TestFixture]
    public class TestSimpleConversionWithA
    {
        private ObjectConvertor<BA, VA> bvConvertor;

        [SetUp]
        public void SetUp()
        {
            bvConvertor = new ObjectConvertor<BA, VA>();
        }

        [Test]
        public void TestConversion()
        {
            BA ba = new BA
                      {
                          A = "aa",
                          B = "bb",
                          C = 123
                      };

            VA va = bvConvertor.ObjectOfBusinessToView(ba);

            Assert.AreEqual(ba.A, va.A);
            Assert.AreEqual(ba.B, va.B);
            Assert.AreEqual(ba.C, va.C);
        }
    }
}